#include <iostream>
using namespace std;
const int N = 25;
int a[N][N];


int main()
{
	int n;
	cin >> n;
	for(int i = 0;i<n;i++)
	{
		for(int j = 0;j<=i;j++)
	     {
	     	if(j==0||j==i)
	     	{
	     		a[i][j] = 1;
	     		continue;
			 }
			 a[i][j] = a[i-1][j] + a[i-1][j-1];
		 }
	}
	for(int i =0;i<n;i++)
	{
		for(int j = 0;j<=i;j++)
		{
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
  
  
   
}
